#include "Includes.h"
///////////////////////////////////////////////////////////////////////////////////////
void Choose_Role()
{
	if(SensorValue[ROLE_JUMPER]==0)//jumper inserted
	{
		ROLE=RT_Cube;
	}
	if(SensorValue[ROLE_JUMPER]==1)//jumper NOT inserted
	{
		ROLE=RT_Section;
	}
}
//////
void Led_Show()
{
	int k=0;
	int time=0;


	if(ROLE==RT_Section)
	{
		k=10;
		time=600;
	}
	if(ROLE==RT_Cube)
	{
		k=40;
		time=100;
	}

	SensorValue[led_Blue]=led_off;
	SensorValue[led_Red]=led_off;

	for(;k>0;k--)
	{
		SensorValue[LED]=!SensorValue[LED];
		wait1Msec(time);
	}

	SensorValue[led_Blue]=led_off;
	SensorValue[led_Red]=led_off;
}
